#!/bin/sh
# Copyright (c) 2011, bkil.hu
# This program is free software and can be distributed under the terms of
# the GNU General Public License v2,
# see COPYING for detailed licensing terms.

# note: this is not an executable, just a library

di(){
 echo
 date
 [ "$1" = "" ] ||
  echo "${1}..."
 shift
 echo $@
 $@
}

d(){
 if
  di "$@"
 then
  echo " ok"
 else
  local R=$?
  echo " error $R"
  exit $R
 fi
}

dn(){
 d "" $@
}

